<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 *
 * @version 1.0
 * @author xpl0it
*/

class Node extends CI_Controller {

	function __construct() {
	 	parent::__construct();
	 	$this->load->model('customer_model','node');
	 	$this->load->model('customer_area_model');
	 }

	function index(){
		$this->checkauth();
		$node = $this->node;
		$data['query']= $node->select_by_table('customer');
		$content = $this->load->view('node/detail', $data,true);
		$content_data = new stdClass(); 
		$content_data->content = $content;
		$this->load->view('template/render_dt',$content_data);
	}

	function add(){ //บันทึกข้อมูล
		$this->checkauth();
		$data="";
		$content = $this->load->view('node/addnode', $data,true);
		$content_data = new stdClass(); 
		$content_data->content = $content;
		$this->load->view('template/render',$content_data);
	}

	private function checkauth(){
		if(!$this->session->userdata('authen')){
			redirect('admin/login/','refresh');
		}
	}



















}

/* End of file customer.php */
/* Location: ./application/controllers/admin/node.php */